# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-zeroconf
pkgver=0.28.0
pkgrel=0
pkgdesc="A Python implementation of multicast DNS service discovery"
url="https://github.com/jstasiak/python-zeroconf"
arch="noarch"
license="LGPL-2.0-or-later"
replaces="py-zeroconf" # for backwards compatibility
provides="py-zeroconf=$pkgver-r$pkgrel" # for backwards compatibility
depends="py3-ifaddr>=0.1.7 python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/z/zeroconf/zeroconf-$pkgver.tar.gz"
builddir="$srcdir"/zeroconf-$pkgver

build() {
	python3 setup.py build
}

check() {
	pytest-3 zeroconf/test* \
		-k 'not (test_integration_with_listener_ipv6 or test_launch)'
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="b4e786c1ee65c1944ec502f92748f93939be82cd867b82a42c502474f86bb5c65fd87061497c243c696a5bcdf711c0cdafd141dbfb778ac1f518a117aa8ce137  zeroconf-0.28.0.tar.gz"
